<!DOCTYPE html>
<html class="whitebg">

<head>
    <meta charset="utf-8">
    <title>监理服务系统</title>
    <!--公用样式-->
    <link rel="stylesheet" type="text/css" href="${re.contextPath}/plugin/common/css/comment.css"/>
    <!--页面样式-->
    <link rel="stylesheet" type="text/css" href="${re.contextPath}/plugin/common/css/style.css"/>
    <!--Layui-->
    <link rel="stylesheet" href="${re.contextPath}/plugin/layui/css/layui.css" media="all"/>
    <!--页面样式-->
    <link rel="stylesheet" type="text/css" href="${re.contextPath}/plugin/common/css/extended.css"/>
    <!--JQ-->
    <script type="text/javascript" charset="utf-8"
            src="${re.contextPath}/plugin/common/js/jquery-1.8.3.min.js"></script>
    <!--Layui-->
    <script type="text/javascript" src="${re.contextPath}/plugin/layui/layui.js" charset="utf-8"></script>
    <!--公用样式JS-->
    <script type="text/javascript" src="${re.contextPath}/plugin/common/js/comment.js" charset="utf-8"></script>
    <!--进度条-->
    <style>
        .layui-table-cell {
            height: 46px;
            line-height: 46px;
        }
    </style>
<body>
<div class="project whitebg" style="margin-top: 0px;float: left;">
    <input type="hidden" id="id" value="${dto.id}">
    <input type="hidden" id="commentId" value="${dto.commentId}">
    <div class="myDataCentere mydataCentere-small" style="text-align:center; height: auto">
        <ul class="clearfix">
            <li class="clearfix fl">
                <div style="text-align: left;font-size: larger;font-weight: bolder;margin-bottom: 10px;">
                    回复评论
                </div>
                <div>
                       <textarea name="content" style="width: 550px;height: 150px;" id="content" autocomplete="off"
                                 lay-maxlength="200"
                                 placeholder="回复评论" lay-verify="maxlength"></textarea>

                </div>

            </li>
        </ul>
    </div>
    <div class="clearfix fr" style="margin-top: 15px">
        <button type="button" class="bluebg white bor0 fl ft10" id="btnsave"
                style="margin-left: 12px;width: 80px;height: 30px; border-radius: 6px; " onclick="commit()">提交
        </button>
    </div>

</div>
<script type="text/javascript" charset="utf-8" src="${re.contextPath}/plugin/common/js/comment.js"></script>
<script type="text/javascript" src="${re.contextPath}/plugin/tools/tool.js"></script>
<!--启动JS-->
<script type="text/javascript" charset="utf-8" src="${re.contextPath}/plugin/common/js/jquery.boot.js"></script>
<!--启动JS-->
<script type="text/javascript" charset="utf-8" src="${re.contextPath}/plugin/common/js/jquery.common.js"></script>
<script type="text/javascript" src="${re.contextPath}/plugin/layui/layui.all.js"></script>
<script type="text/javascript" src="${re.contextPath}/pageoffice.js" id="po_js_main"></script>
<script type="text/javascript" charset="utf-8" src="${re.contextPath}/plugin/common/js/form.file.js"></script>
<script type="text/javascript" charset="utf-8" src="${re.contextPath}/plugin/layui/lay/extra/autocomplete.js"></script>
<script type="text/javascript" charset="utf-8" src="${re.contextPath}/plugin/layui/dropdown_2.3.3/dropdown.js"></script>
<script type="text/javascript" charset="utf-8" src="${re.contextPath}/plugin/ueditor/ueditor.config.js"></script>
<script type="text/javascript" charset="utf-8" src="${re.contextPath}/plugin/ueditor/ueditor.all.min.js"></script>
<!--建议手动加在语言，避免在ie下有时因为加载语言失败导致编辑器加载失败-->
<!--这里加载的语言文件会覆盖你在配置项目里添加的语言类型，比如你在配置项目里配置的是英文，这里加载的中文，那最后就是中文-->
<script type="text/javascript" charset="utf-8" src="${re.contextPath}/plugin/ueditor/lang/zh-cn/zh-cn.js"></script>
<script type="text/javascript" charset="utf-8" src="${re.contextPath}/plugin/supplier/common/js/fileoper.js"></script>
<script type="text/javascript" src="${re.contextPath}/plugin/tools/tool.js"></script>
<script type="text/javascript">
    var layer;
    var form = layui.form;
    var table = null;
    var tableIns = null;
    //注意进度条依赖 element 模块，否则无法进行正常渲染和功能性操作
    var element = "";
    layui.use('element', function () {
        element = layui.element;
    });
    var ue = UE.getEditor('content', {
        toolbars: [
            [
                'emotion' //表情
            ]
        ],
        initialFrameWidth: null,//宽度随浏览器自适应
        wordCount: false,//关闭字数统计
        autoHeightEnabled: false,//是否自动长高
    });

    setTimeout(function () {
        $("#edui2").css("height", "25px");
        $("#edui3").css("float", "left");
        $("#edui1_bottombar").css("display","none");

    }, 20);

    function commit() {
        var id = $("#id").val();
        var commentId=$("#commentId").val();
        var content = UE.getEditor('content').getContent();
        if(!content.trim()){
            layer.msg("请输入内容", {icon: 2});
            return false;
        }
        if(content.trim().length>300){
            layer.msg("内容不能大于300个字符", {icon: 2});
            return false;
        }
        var jsonc = {
            id: id,
            commentId: commentId,
            content: content
        }
        layerAjax('/search/znSerch/savePLHf', jsonc, '', function (d) {
            if (d.flag == true) {
                $('#btnsave').addClass("layui-btn-disabled").attr("disabled", true);
                layer.msg(d.msg, {icon: 1});
                var index = parent.layer.getFrameIndex(window.name);
                setTimeout(function () {
                    parent.layer.close(index);
                }, 2000);

            } else {
                $('#btnsave').removeClass("layui-btn-disabled").attr("disabled", false);
                layer.msg(d.msg, {icon: 2});
            }
        });

    }


</script>

</body>

</html>
